package com.aistar.service.common;

import java.util.concurrent.TimeUnit;

/**
 * @ClassName: RedisLock
 * @author: LiuWenXiu
 * @date: 2021/11/1 10:37
 * @Description: TODO...
 */
public interface RedisLock {
    /**
     * 尝试加锁
     */
    boolean tryLock(String key, long timeout, TimeUnit unit);

    /**
     * 解锁操作
     */
    void releaseLock(String key);

}